<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>
// 关系运算符
// > < == === >= <= != !==
// 关系运算符返回布尔值

// console.log( 5 > 3 );// true
// console.log( 5 < 3 );// false
// console.log( 5 >= 5 );// true
// console.log( 5 <= 5 );// true

console.log( 5 == 5 );// true

// == 等于,会自动转换数据类型
console.log( 5 == '5' );// true
console.log( 5 == Number('5') );// true
console.log( 5 == 5 );// true

// === 全等(严格等于),要求值和数据类型都相同,不会自动转换数据类型
console.log( 5 === '5' );// false

// != -> !==
// !== -> !===
console.log( 5 != '5' );// false
console.log( 5 !== '5' );// true

</script>
</body>
</html>